//
//  VOCResultView.m
//  iVoc
//
//  Created by Wallace Wu on 09-3-26.
//  Copyright 2009 Sonic Solutions. All rights reserved.
//

#import "VOCResultViewController.h"
#import "VocListController.h"


@implementation VOCResultViewController

@synthesize rightTimes;
@synthesize wrongTimes;

/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
    labelCorrect.text = [NSString stringWithFormat:@"%d",self.rightTimes];
    labelWrong.text = [NSString stringWithFormat:@"%d",self.wrongTimes];
    [self.navigationItem setHidesBackButton:YES];
}

-(IBAction)backToMain:(id)sender
{
    for (UIViewController *mainView in [self.navigationController viewControllers]) {
        if([mainView isKindOfClass:[VocListController class]])
        {
            [self.navigationController popToViewController:mainView animated:YES];
        }
    }
}

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
    // Release anything that's not essential, such as cached data
}


- (void)dealloc {
    [labelCorrect release];
    [labelWrong release];
    [super dealloc];
}


@end
